import { Pipe, PipeTransform } from '@angular/core';
import { TaskPeriod } from '../services/task.service';

@Pipe({
  name: 'taskPeriodType'
})
export class TaskPeriodTypePipe implements PipeTransform {

  transform(value: any, args?: any): any {
    switch (value) {
      case TaskPeriod.All:
        return "全部任务时间";
      case TaskPeriod.Now:
        return "立即执行";
      case TaskPeriod.Timing:
        return "定时执行";
      case TaskPeriod.Schedule:
        return "周期执行"
    }
    return value
  }

}
